#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
 
int main()
{
	int i = 0;
	for (i = 0; i < 10; i++)
	{
		if (i = 5)///////死循环为5    i=5是在给i赋值而不是判断
			printf("%d ", i);
	}
	return 0;
}
int func(int a)
{
	int b;
	switch (a)
	{
	case 1:b = 10;
	case 2:b = 20;
	case 3:b = 36;
	default:b = 0;
	}
	return b;
}
int main()
{
	printf("%d",func(1));
	return 0;
}//////结果为0
int main()
{
	int x = 3;
	int y = 3;
	switch (x % 2)
	{
	case 1:
		switch (y)
		{
		case 0:
			printf("first\n");
		case 1:
			printf("secend\n");
			break;
		default:
			printf("hello\n");
		}
	case 2:
		printf("third");
	}
	return 0;
}//////结果为hello third

//写代码将三个整数从大到小输出
int main()
{
	int a = 0;
	int b = 0;
	int c = 0;
	//输入
	scanf("%d%d%d", &a, &b, &c);
	//调整顺序
	if (a < b)
	{
		int  tmp = a;
		a = b;
		b = tmp;
	}
	if (a < c)
	{
		int tmp = a;
		a = c;
		c = tmp;
	}
	if (b < c)
	{
		int tmp = b;
		b = c;
		c = tmp;
	}
	//输出-大到小
	printf("%d %d %d \n", a, b, c);

	return 0;
}

//打印1-100所有3的倍数
int main()
{
	int i = 0;
	for (i = 1; i < 100; i++)
	{
		if (i % 3 == 0)
			printf("%d ", i);
	}
	return 0;
}

//给定两个数 求两个数的最大公约数
int main()
{
	int m = 0;
	int n = 0;
	
	scanf("%d%d", &m, &n);
	int max = 0;
	if (m > n)
		max = n;
	if (m < n)
		max = m;
	while (1)
	{
		if (m % max == 0 && n % max == 0)
		{
			printf("最大公约数：%d\n", max);
			break;
		}
		max--;
	}
	return 0;
}

//辗转相除法
int main()
{
	int m = 0;
	int n = 0;
	scanf_s("%d%d", &m, &n);
	int t = 0;
	while (m % n)
	{
		t = m % n;
		m = n;
		n = t;
	}
	printf("%d", n);
	return 0;
}